package edu.sctu.practice.class02.xuejiahua.assign05.ass02;

/**
 * Created by Dom_xuejiahua on 2015/12/17.
 */
public class Sort3 {
    double max1;
    double max2;
    double max3;

    Sort3(){
        max1 = -1;
        max2 = -1;
        max3 = -1;

    }
    void sort(){
        double s;
        if (max1 < max2) {
            s = max1;
            max1 = max2;
            max2 = s;
        }
        if (max1 < max3) {
            s = max1;
            max1 = max3;
            max3 = s;
        }
        if (max2 < max3) {
            s = max2;
            max2 = max3;
            max3 = s;
        }

    }

}
